package com.glela.packet.service.impl;

import com.glela.packet.mapper.RedPacketRecordOmtRlBizMapper;
import com.glela.packet.mapper.RedPacketRecordOmtRlMapper;
import com.glela.packet.model.RedPacketRecordOmtRl;
import com.glela.packet.service.RedPacketRecordOmtRlService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("redPacketRecordOmtRlService")
public class RedPacketRecordOmtRlServiceImpl implements RedPacketRecordOmtRlService {

  @Autowired
  private RedPacketRecordOmtRlMapper redPacketRecordOmtRlMapper;
  @Autowired
  private RedPacketRecordOmtRlBizMapper redPacketRecordOmtRlBizMapper;

  @Override
  public List<RedPacketRecordOmtRl> listByRedPacketRecordId(int redPacketRecordId) {
    return redPacketRecordOmtRlBizMapper.listByRedPacketRecordId(redPacketRecordId);
  }

  @Override
  public boolean updateRedPacketRemainCount(RedPacketRecordOmtRl redPacketRecordOmtRl) {
    return redPacketRecordOmtRlBizMapper.updateRemainCount(redPacketRecordOmtRl) > 0;
  }
}
